package org.web.demo.common.qo;

/**
 * 分页查询条件对象，常见的命名规则还有dto等，放置查询的条件
 *
 * @author yexi
 */
public class QueryObject {
    private int currentPage = 1;
    private int pageSize = 5;

    public QueryObject() {
    }

    public QueryObject(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getStart() {
        return (currentPage - 1) * pageSize;
    }
}
